using Newtonsoft.Json.Utilities;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;

namespace IQIGame.Onigao.GameAOT
{
    public class RefTypes
    {
        public void MyAOTRefs()
        {
            #region for hotupdate程序集
            new HashSet<string>();
            _ = (object)new Dictionary<Type, object>();
            _ = (object)new Dictionary<string, object>();
            AsyncVoidMethodBuilder builder = default;
            IAsyncStateMachine asm = default;
            builder.Start(ref asm);
            #endregion

            #region 常见的泛型, 这里初始化用于提升性能
            new List<object>();
            new HashSet<object>();
            new Dictionary<object, object>();

            new List<int>();
            new HashSet<int>();
            new Dictionary<int, int>();
            new Dictionary<string, int>();

            new List<bool>();
            new Dictionary<int, bool>();
            new Dictionary<string, bool>();

            new List<float>();
            new Dictionary<int, float>();
            new Dictionary<string, float>();

            new List<double>();
            new Dictionary<int, double>();
            new Dictionary<string, double>();

            #endregion

            #region json problem
            AotHelper.EnsureList<int>();
            AotHelper.EnsureList<string>();
            #endregion
        }
    }
}
